const Sequesize = require("sequelize");

const Utils = require("../../src/utils");

const sequelize = new Sequesize(Utils.getConfig().database);

sequelize
  .authenticate()
  .then(() => {
    console.log("Connection has been established successfully.");
  })
  .catch((e) => {
    console.error("Unable to connect to the database:", e);
  });

module.exports = sequelize;
